﻿<!DOCTYPE html>
<!--总体评估考核评分liebiao-->
<html>

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <script src="/static/js/common.js"></script>
    <style>
        .el-table__body-wrapper table tbody tr td {
            text-align: center;
        }
        .el-table__row td {
            padding: 0px !important;
        }
    </style>
</head>

<body>
    <div id="app" v-cloak class="popupW50">
        <el-form ref="form" :inline="true" label-position="right" label-width="100px" :model="formInline"
            class="demo-form-inline" style="margin-bottom: 15px;">

            <el-row>
                <el-col class="head-tool">
                    
<div class="new_title fl"><strong><img src="/static/images/icon1.png" />总体评估考核审批列表</strong></div>
<span>
    <btn :text="col.btnSelect" imgsrc="/static/images/search.png" @click="onSubmit">
    </btn>
</span>
                </el-col>
            </el-row>
            <el-row>
                <el-col :xs="12" :sm="12" :md="8" :lg="6" :xl="6">
                    <div class="elst-select-mini">
                        <el-form-item>
                            <el-input v-model="formInline.model.contractorName"
                                      :placeholder="OverallAssessment.ContractorName" size="mini">
                                <template slot="prepend">
                                    {{OverallAssessment.ContractorName+mark.m}}
                                </template>
                            </el-input>
                        </el-form-item>
                    </div>
                </el-col>
                <el-col :xs="12" :sm="12" :md="8" :lg="6" :xl="6">
                    <div class="elst-select-mini">
                        <el-form-item>
                            <el-input size="mini">
                                <template slot="prepend">
                                    {{OverallAssessment.Type+mark.m}}
                                </template>
                                <el-select @visible-change="visibleChange" v-model="formInline.model.assessTypeId" slot="suffix"
                                           :placeholder="DailyAssessmentType.Type" @change="onSubmit">
                                    <!-- <el-option :label="Type[0].value" value=""></el-option> -->
                                    <el-option v-for="item in Type" :label="item.value" :value="item.id">
                                    </el-option>
                                </el-select>
                            </el-input>
                        </el-form-item>
                    </div>
                </el-col>
                <el-col :xs="8" :sm="8" :md="8" :lg="6" :xl="6">
                    <div class="elst-select-mini">
                        <el-form-item>
                            <el-input size="mini">
                                <template slot="prepend">
                                    {{"年份"+mark.m}}
                                </template>
                                <el-date-picker v-model="formInline.model.mark03" type="year" slot="suffix"
                                                size="mini" format="yyyy" value-format="yyyy" placeholder="选择年份">
                                </el-date-picker>
                            </el-input>
                        </el-form-item>
                    </div>
                </el-col>
            </el-row>
        </el-form>

        <el-table ref="table" stripe :data="ListItem.tableData" :height="ListItem.tableHeight" border
                  @selection-change="handleSelectionChange" row-style="height:10px" style="width: 100%">
            <el-table-column type="selection" align="center" width="55">
            </el-table-column>
            <el-table-column type="index" :label="ContractorDirectory.SerialNumber" :index="indexMethod" width="50"
                             show-overflow-tooltip="true"></el-table-column>
            <el-table-column prop="cbS_TotalCheckTask.year" label="年份" min-width="100">
            </el-table-column>
            <el-table-column prop="cbS_List.contractorName" :label="OverallAssessment.ContractorName" min-width="180">
                <template slot-scope="scope">
                    <a type="text" style="color:#409EFF;cursor:pointer;" @click="label_click('xz',scope.row.id)">
                        {{scope.row.cbS_List.contractorName}}
                    </a>
                </template>
            </el-table-column>
            <el-table-column prop="sysDataDic.value" :label="OverallAssessment.Type" min-width="180">
            </el-table-column>
            <!-- <el-table-column prop="OverallAssessmentTypeName" :label="OverallAssessment.OverallAssessmentTypeName"
    width="150"> -->
            <!-- </el-table-column> -->
            <!--<el-table-column prop="projectName" :label="OverallAssessment.ProjectName" show-overflow-tooltip="true"
        min-width="150">
    </el-table-column>

    <el-table-column prop="contractNo" :label="OverallAssessment.ContractNo" show-overflow-tooltip="true"
        min-width="150">
    </el-table-column>-->
            <!-- <el-table-column prop="CommentItem" :label="OverallAssessmentScore.CommentItem" show-overflow-tooltip="true"
    min-width="260"> -->
            <!-- </el-table-column> -->
            <!-- <el-table-column prop="TheWeight" :label="OverallAssessmentScore.TheWeight" min-width="50">
    </el-table-column> -->
            <el-table-column prop="mark01" :label="OverallAssessment.AllFraction" min-width="50">
            </el-table-column>
            <el-table-column prop="fraction" :label="OverallAssessmentScore.Score" min-width="50">
            </el-table-column>
            <el-table-column prop="territorialEvaluationConclusion" :label="OverallAssessment.EvaluationResult"
                             show-overflow-tooltip="true" min-width="260">
            </el-table-column>
            <el-table-column prop="territorialEvaluationDate" :label="OverallAssessmentScore.EvaluationTime" :formatter="myformatDate" min-width="150">
            </el-table-column>
            <el-table-column prop="isContractorDirectory" :label="OverallAssessment.YesOrNo" width="140">
                <template slot-scope="scope">
                    <p v-if="scope.row.isContractorDirectory=='0'">
                        是
                    </p>
                    <p v-if="scope.row.isContractorDirectory=='1'">
                        否
                    </p>
                </template>
            </el-table-column>
            <el-table-column prop="state" label="状态" width="140">
                <template slot-scope="scope">
                    <p v-if="scope.row.state=='0'">
                        未审批
                    </p>
                    <p v-if="scope.row.state=='1'">
                        属地签字
                    </p>
                    <p v-if="scope.row.state=='2'">
                        业务签字
                    </p>
                    <p v-if="scope.row.state=='3'">
                        领导签字
                    </p>
                    <p v-if="scope.row.state=='4'">
                        已审批
                    </p>
                </template>
            </el-table-column>

            <el-table-column width="53" prop="update" label="签字" fixed="right">
                <template slot-scope="scope">
                    <button type="button" class="elst-bt-xg" @click=UserInput('xg',scope.row.id)>
                        <i class="el-icon-edit"></i>
                    </button>
                </template>
            </el-table-column>
        </el-table>
        <el-row type="flex" justify="end">
            <el-pagination ref="page" @size-change="handleSizeChange" @current-change="handleCurrentChange"
                :current-page="ListItem.currentPage" :page-sizes="ListItem.pagesizes" :page-size="ListItem.pagesize"
                :layout="ListItem.layout" :total="ListItem.total">
            </el-pagination>
        </el-row>
        <el-dialog title="总体评估考核评分管理" :visible.sync="ListItem.dialogVisible" @close='closeDialog' width="80%"
            height="80%" top="10vh" fullscreen="true">
            <iframe ref="iframe" :src="ListItem.InputUrl" style="height:100%;width:100%" frameborder="0"></iframe>
        </el-dialog>
    </div>
    <script type="text/javascript">
        app = new Vue({
            el: '#app',
            data: function () {
                return {
                    totalCheckTaskID: guidEmpty,
                    Type: [],
                    ListItem: ListItem,
                    formInline: {
                        model: {
                            assessTypeId: '',
                            totalCheckTaskID: '',
                            Type: '',//日常评估考核类别名称
                            contractorName: '', //"承包商名称"
                            ContractNo: '',//合同号
                            ProjectName: '', //"项目名称"
                            CommentItem: '',
                            TheWeight: '',
                            Score: '',
                            EvaluationDescription: '',
                            EvaluationTime: '',
                            mark03:'' //年份
                        },
                        offset: 0,
                        limit: 10
                    }
                }
            }, created: function () {
                var currApp = this;
                window.onresize = function () {
                    currApp.ListItem.tableHeight = window.innerHeight -
                        currApp.$refs.table.$el.offsetTop - 60;
                    if (currApp.ListItem.tableHeight < 112) {
                        currApp.ListItem.tableHeight = 112;
                    }
                }
            },
            mounted: function () {
                ////获取下拉菜单内容
                //this.Type = getDicData('29');
                this.totalCheckTaskID = getUrlParam("id");
                //获取下拉菜单内容
                this.getTypeList();
                if (this.Type == null || this.Type == undefined) { } else {
                    if (this.Type.length > 0) { this.formInline.model.assessTypeId = this.Type[0].id; }
                    //this.formInline.model.Type = this.Type[0].value;
                }
                //初始化数据
                this.GetPageData(1);
                //列表高度自适应
                tablehigh(this);
            },
            methods: {
                //解決edge下select bug
                visibleChange: function (isVisible) {
                    visibleChange(isVisible)
                },
                indexMethod: function (index) {
                    return (this.ListItem.currentPage - 1) * this.ListItem.pagesize + index + 1;
                },
                handleNodeClick: function (data) {
                    console.log(data);
                },
                closeDialog: function () { closeDialog(this); },
                //删除方法
                onDelete: function () { onDelete(this, '/api/CBS_TotalCheck/DeleteMuti'); },
                //列表选择触发
                handleSelectionChange: function (val) { handleSelectionChange(this, val); },
                //Dialog展示
                UserInput: function (val, id) { DialogShow(this, val, "OverallAssessmentScoreApprovalInput.html", id, "&totalCheckTaskID=" + this.totalCheckTaskID); },
                label_click: function (val, id) { DialogShow(this, val, "OverallAssessmentScoreInputMain.html", id, "&totalCheckTaskID=" + this.totalCheckTaskID); },
                //获取分页数据
                GetPageData: function (currentIndex) {
                    this.formInline.model.totalCheckTaskID = this.totalCheckTaskID;
                    GetPageData(this, currentIndex, '/api/CBS_TotalCheck/GetList2')
                },
                //查询方法
                onSubmit: function () { onSubmit(this); },
                //pagesize改变 触发方法
                handleSizeChange: function (val) { handleSizeChange(this, val); },
                //跳页触发方法
                handleCurrentChange: function (val) { handleCurrentChange(this, val); },                
                //初始化承包商类型
                getTypeList: function () {
                    var mythis = this;
                    myAjax("post", this, '/api/CBS_DayCheckItem/CBSsglbGetList', { model: { category: 'cbssglb' }, offset: 0, limit: 100 }, function (response) {
                        mythis.Type = response.data;

                        //console.log(response.data.pageData);
                    }, false);
                },
            }
        });

    </script>
</body>

</html>